.media-library__header.card {
	padding-top: 12px;
	padding-bottom: 12px;
	display: flex;
}

.dialog__content .media-library__header.card {
	box-shadow: none;
	.media-library__scale-range.range {
		top: 11px;
	}
}

.media-library__upload-button-label {
	display: none;

	@include breakpoint-deprecated( '>660px' ) {
		display: inline-block;
	}
}

.media-library__header .button {
	margin-right: 8px;
}

.media-library__header .button.media-library__upload-button {
	margin-right: 0;
	@include breakpoint-deprecated( '<660px' ) {
		border-top-right-radius: 0;
		border-bottom-right-radius: 0;
	}
}

.media-library__header .button.media-library__upload-more {
	margin-left: 0;
}

.media-library__header.media-library__upload-url {
	margin-bottom: 10px;

	@include breakpoint-deprecated( '>480px' ) {
		margin-bottom: 16px;
	}
}

.media-library__content.has-no-upload-button .media-library {
	&__header.card {
		padding-bottom: 36px;
	}

	&__scale-range.range {
		right: 50%;
		margin: 0;
		transform: translateX( 50% );
	}
}

.media-library__filter-bar {
	display: flex;
	flex-flow: row nowrap;
	align-items: stretch;
	position: relative;

	@include breakpoint-deprecated( '<480px' ) {
		flex-wrap: wrap;
	}

	.section-nav {
		flex: 1 auto;
		z-index: z-index( 'root', '.media-library .search.is-expanded-to-container' );

		@include breakpoint-deprecated( '<480px' ) {
			width: auto;
		}

		.search {
			&.is-expanded-to-container {
				height: 100%;
			}

			&.has-focus {
				@include breakpoint-deprecated( '<660px' ) {
					margin-right: 4px;
				}
			}
		}
	}

	.plan-storage {
		display: none;
		margin-bottom: 9px;
		box-shadow:
		  0 0 0 1px rgba( var( --color-neutral-10-rgb ), 0.5 ),
		  0 1px 2px var( --color-neutral-0 );
		background-color: var( --color-surface );
		padding-left: 24px;
		padding-right: 24px;
		box-sizing: border-box;
		flex: 1 0 auto;

		&:focus {
			box-shadow: 0 0 0 1px var( --color-border-subtle ), inset 0 0 0 2px var( --color-primary-light );
			outline: none;
			z-index: 1;
		}

		@include breakpoint-deprecated( '>480px' ) {
			display: flex;
		}

		@include breakpoint-deprecated( '>660px' ) {
			display: none;
		}

		@include breakpoint-deprecated( '>960px' ) {
			display: flex;
			margin-bottom: 17px;
		}
	}

	.media-library__datasource {
		box-shadow:
		  0 0 0 1px rgba( var( --color-neutral-10-rgb ), 0.5 ),
		  0 1px 2px var( --color-neutral-0 );
		background-color: var( --color-surface );
		box-sizing: border-box;
		display: flex;
		align-items: center;
		width: 65px;
		min-height: 50px;
		min-width: 65px;
		margin-bottom: 17px;

		&.is-single-source {
			min-width: 50px;
			width: 50px;
			.media-library__source-button.is-borderless {
				&:hover, &:focus {
					cursor: default;
				}
			}
		}

		@include breakpoint-deprecated( '<480px' ) {
			align-items: normal;
			padding-top: 6px;
		}

		@include breakpoint-deprecated( '<660px' ) {
			margin-bottom: 9px;
		}
	}
}

.editor-media-modal .media-library__datasource {
	margin-bottom: 16px;

	@include breakpoint-deprecated( '<480px' ) {
		margin-bottom: 9px;
	}
}

.media-library__source-button.is-borderless {
	padding: 5px;
	padding-left: 9px;
	height: 38px;

	img {
		min-width: 24px;
		min-height: 24px;
		margin-top: 2px;
	}

	.gridicon {
		top: 4px;
	}

	.gridicons-chevron-down {
		width: 18px;
		height: 18px;
		top: 2px;
	}
}

.editor-media-modal .media-library__filter-bar {
	.plan-storage {
		@include breakpoint-deprecated( '>480px' ) {
			margin-bottom: 16px;
		}
	}
}

.media-library__heading {
	@include heading;
	display: inline-block;
	margin: 0;
	line-height: 40px;
	margin-right: 12px;

	@include breakpoint-deprecated( '<480px' ) {
		display: none;
	}
}

.media-library__upload-buttons {
	display: inline;
}

.media-library__header-popover {
	.popover__menu-item {
		padding-left: 12px;
	}

	.popover__menu img, .popover__menu svg {
		margin-right: 8px;
		vertical-align: middle;
	}
}

.media-library__scale-toggle.segmented-control {
	position: absolute;
	right: 16px;
	&.is-compact .segmented-control__link {
		padding: 2px 4px;
	}

	@include breakpoint-deprecated( '>480px' ) {
		display: none;
	}
}

.media-library__scale-range {
	display: none;

	@include breakpoint-deprecated( '>480px' ) {
		display: block;
	}
}

.media-library__scale-toggle .gridicon {
	margin: 2px 4px;
	vertical-align: middle;
}

.media-library__content .notice {
	margin-bottom: 0;
}

.media-library__list {
	padding: 0 16px;
}

.media-library__list-item.is-small .media-library__list-item-file-details .media-library__list-item-icon {
	top: 0;
}

.media-library__list-item.is-small .media-library__list-item-details-separator,
.media-library__list-item.is-small .media-library__list-item-file-extension {
	display: none;
}

.media-library__videopress-nudge-container {
	display: block;
	overflow-y: auto;
	right: 0;
	left: 0;
	margin: 0;
}

.editor-media-modal .media-library__videopress-nudge-container {
	position: absolute;
	top: 50px;
	bottom: 72px;

	.empty-content__line {
		margin-right: 20px;
		margin-left: 20px;
	}
}

.empty-content .media-library__videopress-nudge-regular.card.upsell-nudge {
	margin-left: auto;
	margin-right: auto;
	text-align: left;
	width: 70%;
	text-decoration: none;
}
